package gemini.castor.ui.client.page.content.store.shoppingcart;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiTemplate;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;


public class ShoppingCartView extends Composite implements ShoppingCartPresenter.Display {
	
	@UiField
	VerticalPanel contentPanel;
	
	@UiTemplate("ShoppingCartView.ui.xml")
	interface MyUiBinder extends UiBinder<Panel, ShoppingCartView> {
	}

	private static final MyUiBinder binder = GWT.create(MyUiBinder.class);

	public ShoppingCartView() {
		initWidget(binder.createAndBindUi(this));
	}

	@Override
	public void showWidget(Widget widget) {
		contentPanel.clear();
		contentPanel.add(widget);
	}

	@Override
	public Widget asWidget() {
		return this;
	}
}
